package com.scs.application.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.entity.DataEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityIndexAnnotation;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * <p>
 * 编号规则
 * </p>
 */
@Accessors(chain = true)
@Data
@EntityClassAnnotation(remark = "编号规则表")
@TableName("sys_serial_rule")
@EntityIndexAnnotation(ux = {"code"})
public class SerialRule extends DataEntity {

    @EntityFieldAnnotation(
            text = "规则编码",
            length = "32",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String code;

    @EntityFieldAnnotation(
            text = "编码名称",
            length = "32",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String name;

    @EntityFieldAnnotation(
            text = "分隔符",
            length = "2",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String delimiter;

    @EntityFieldAnnotation(
            text = "编码段数量",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Integer partNum;

    @EntityFieldAnnotation(
            text = "编码段1表达式 : 自定义常量字符串：string_；自增序列号：sequence_x，日期：datetime_x",
            length = "32",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String part1Cond;

    @EntityFieldAnnotation(
            text = "编码段1字符串 : 只有当表达式为string_ 时，此常量字符串才生效",
            length = "32",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String part1;

    @EntityFieldAnnotation(
            text = "编码段2表达式 : 自定义常量字符串：string_；自增序列号：sequence_x，日期：datetime_x",
            length = "32",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String part2Cond;

    @EntityFieldAnnotation(
            text = "编码段2字符串 : 只有当表达式为string_ 时，此常量字符串才生效",
            length = "32",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String part2;

    @EntityFieldAnnotation(
            text = "编码段3表达式 : 自定义常量字符串：string_；自增序列号：sequence_x，日期：datetime_x",
            length = "32",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String part3Cond;

    @EntityFieldAnnotation(
            text = "编码段3字符串 : 只有当表达式为string_ 时，此常量字符串才生效",
            length = "32",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String part3;

    @EntityFieldAnnotation(
            text = "编码段4表达式 : 自定义常量字符串：string_；自增序列号：sequence_x，日期：datetime_x",
            length = "32",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String part4Cond;

    @EntityFieldAnnotation(
            text = "编码段4字符串 : 只有当表达式为string_ 时，此常量字符串才生效",
            length = "32",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String part4;



}
